package com.netflexitysolutions.amazonws.ec2;

import java.util.HashMap;
import java.util.Map;

public enum InstanceType {
	
	SMALL ("m1.small"),
	LARGE ("m1.large"),
	XLARGE ("m1.xlarge"),
	HCPU_MEDIUM ("c1.medium"),
	HCPU_XLARGE ("c1.xlarge");
	
	private static Map<String, InstanceType> typeByName = new HashMap<String, InstanceType>();
	
	static {
		InstanceType[] types = InstanceType.values();
		for (InstanceType type : types) {
			typeByName.put(type.getName(), type);
		}
	}
	
	public static InstanceType instanceTypeForName(String name) {
		return typeByName.get(name);
	}
	
	private String name;
	
	private InstanceType(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}
}
